<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="lijinbo" />
    <title>110-迷人的加载动画</title>
    <style>
      li {
        width: 500px;
        margin: 16px;
      }

      /* 1 */
      .dom {
        width: 20px;
        height: 20px;
        border: 1px solid red;
        position: relative;
        animation: circle 1s infinite linear;
      }

      .dom_in {
        width: 20px;
        height: 20px;
        border: 1px solid red;
        position: absolute;
        transform: rotate(45deg);
      }

      @keyframes circle {
        0% {
          transform: rotate(0deg);
        }

        100% {
          transform: rotate(360deg);
        }
      }

      /* 2 */
      .loader {
        border: 16px solid #f3f3f3;
        border-radius: 50%;
        border-top: 16px solid #3498db;
        width: 80px;
        height: 80px;
        animation: spin 1s linear infinite;
      }

      @keyframes spin {
        0% {
          transform: rotate(0deg);
        }

        100% {
          transform: rotate(360deg);
        }
      }
    </style>
  </head>

  <body>
    <ol>
      <li>
        <div class="dom">
          <div class="dom_in"></div>
        </div>
      </li>
      <li>
        <div class="loader"></div>
      </li>
    </ol>
    <script></script>
  </body>
</html>
